package lab02.test16;

/**
 * Created by 123 on 2017/12/29.
 */
public class Add extends Math {
    int arr[] = new int[5];
    int sum;

    @Override
    int add() {
        for (int i = 0; i <=4; i++) {
            sum = sum + arr[i];
        }
        System.out.println("所求和为"+sum);
        return sum;
    }

}
